package ebusiness.ebusiness.Dao.UserDao;

import ebusiness.ebusiness.Entity.Address;
import ebusiness.ebusiness.Entity.UserEntity.RegisteUser;
import ebusiness.ebusiness.Entity.UserEntity.UserDetail;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface UserQuery {
    Address getAddressById(@Param("addressid") int addressId);
    List<Address> getAddressByUser(@Param("userid") int userID);
    List<Integer> getAllAddressID();
    void addAddress(@Param("aid")int aid,@Param("name")String name,@Param("provice")String provice,
                    @Param("city")String city,@Param("address")String addresss,@Param("postal")String postal,
                    @Param("uid")int uid);
    void modifyAddress(@Param("aid")int aid,@Param("name")String name,@Param("provice")String provice,
                       @Param("city")String city,@Param("address")String addresss,@Param("postal")String postal,
                       @Param("uid")int uid);
    void deladdress(@Param("uid")int uid);


    RegisteUser getRegisteUserByID(@Param("id") int id);
    RegisteUser findRegistUserByName(@Param("name") String name);
    void addARegisteUser(@Param("username") String customer_name,@Param("userpw") String customer_password);

    UserDetail getUserDetailByID(@Param("id") int id);
   void modifyPersonInfo(@Param("cname")String name,@Param("cid")int cid,@Param("wid")int wid,@Param("email")String email,
                         @Param("phone")String phone,@Param("sex")String sex,@Param("birthday")String date,
                         @Param("hobby")String hobby,@Param("num")String num,@Param("marriage")String marriage,
                         @Param("education")String edu,@Param("mincome")double mincome,@Param("job")String job,
                         @Param("img")String img
                         );
   void addPersonInfo (@Param("cname")String name,@Param("cid")int cid,@Param("wid")int wid,@Param("email")String email,
                       @Param("phone")String phone,@Param("sex")String sex,@Param("birthday")String date,
                       @Param("hobby")String hobby,@Param("num")String num,@Param("marriage")String marriage,
                       @Param("education")String edu,@Param("mincome")double mincome,@Param("job")String job,
                       @Param("img")String img
   );
   void modifyPassWord(@Param("uid")int uid,@Param("password")String password);
}
